const express = require('express');

const multer = require('multer')

const path = require('path')

const router = express.Router();

const router_handler = require('../router_handler/upload.js');

// 配置文件上传路径
const upload_avatar = multer({dest: path.resolve(__dirname, '../upload/avatar')})

// 上传 - 头像
router.post('/avatar', upload_avatar.single('avatar'), router_handler.handleUploadAvatar)

module.exports = router;    